<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="UTF-8">
  <title>双向绑定</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
  输入框：<input type="text" value="" v-model="val1"/> {{val1}}
  <hr/>
  文本框：<textarea v-model="val2"></textarea> {{val2}}
  <hr/>
  单选框：<input type="radio" name="sex" value="男" v-model="val3">男
  <input type="radio" name="sex" value="女" v-model="val3">女
  &nbsp;&nbsp;&nbsp;&nbsp; 选中的是谁？{{val3}}
  <hr/>
  下拉框：
  <select v-model="val4">
    <option value="">---请选择---</option>
    <option>A</option>
    <option>B</option>
    <option>C</option>
    <option>D</option>
  </select>
  选中的结果是：{{val4}}
</div>
</body>
<script>
  var vm = new Vue({
    el: "#app",
    data: {
      val1: "",
      val2: "",
      val3: "",
      val4: ""
    }
  })
</script>
</html>